package com.tfswue.hxl.listener;

import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.annotation.WebListener;
import org.slf4j.LoggerFactory;

//import java.util.logging.Logger;
import org.slf4j.Logger;
@WebListener
public class MyContextListener implements ServletContextListener {
    private static final Logger logger = org.slf4j.LoggerFactory.getLogger(MyContextListener.class);

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        logger.info("Web 应用已启动-开始初始化");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        logger.info("Web 应用已停止-开始销毁");
    }
}
